package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Gchooayc type
*/
@SuppressWarnings("ALL")
public class Gchooayc {


        private static volatile Gchooayc instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Gchooayc getInstance() {
            if (instance == null) {
                synchronized (Gchooayc.class) {
                    if (instance == null) {
                        instance = new Gchooayc();
                    }
                }
            }
            return instance;
        }


        private Gchooayc() {

        }



    public  Boolean judgeSlglgyclmi(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeUwtypyjryw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeWxkkrworft(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeSxrttajxsg(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeYfmuinzzta(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNcsyqczbob(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNmutipvajw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeAjrkwgurft(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGxisntueha(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeCiiiqldhdg(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLwsopkrjve(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeBckxysofdz(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeEluwatzmbv(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  slglgyclmi;
    private String  uwtypyjryw;
    private String  wxkkrworft;
    private String  sxrttajxsg;
    private String  yfmuinzzta;
    private String  ncsyqczbob;
    private String  nmutipvajw;
    private String  ajrkwgurft;
    private String  gxisntueha;
    private String  ciiiqldhdg;
    private String  lwsopkrjve;
    private String  bckxysofdz;
    private String  eluwatzmbv;


    public void setSlglgyclmi(String slglgyclmi){
    this.slglgyclmi = slglgyclmi;
    }

    public String getSlglgyclmi(){
    return this.slglgyclmi;
    }
    public void setUwtypyjryw(String uwtypyjryw){
    this.uwtypyjryw = uwtypyjryw;
    }

    public String getUwtypyjryw(){
    return this.uwtypyjryw;
    }
    public void setWxkkrworft(String wxkkrworft){
    this.wxkkrworft = wxkkrworft;
    }

    public String getWxkkrworft(){
    return this.wxkkrworft;
    }
    public void setSxrttajxsg(String sxrttajxsg){
    this.sxrttajxsg = sxrttajxsg;
    }

    public String getSxrttajxsg(){
    return this.sxrttajxsg;
    }
    public void setYfmuinzzta(String yfmuinzzta){
    this.yfmuinzzta = yfmuinzzta;
    }

    public String getYfmuinzzta(){
    return this.yfmuinzzta;
    }
    public void setNcsyqczbob(String ncsyqczbob){
    this.ncsyqczbob = ncsyqczbob;
    }

    public String getNcsyqczbob(){
    return this.ncsyqczbob;
    }
    public void setNmutipvajw(String nmutipvajw){
    this.nmutipvajw = nmutipvajw;
    }

    public String getNmutipvajw(){
    return this.nmutipvajw;
    }
    public void setAjrkwgurft(String ajrkwgurft){
    this.ajrkwgurft = ajrkwgurft;
    }

    public String getAjrkwgurft(){
    return this.ajrkwgurft;
    }
    public void setGxisntueha(String gxisntueha){
    this.gxisntueha = gxisntueha;
    }

    public String getGxisntueha(){
    return this.gxisntueha;
    }
    public void setCiiiqldhdg(String ciiiqldhdg){
    this.ciiiqldhdg = ciiiqldhdg;
    }

    public String getCiiiqldhdg(){
    return this.ciiiqldhdg;
    }
    public void setLwsopkrjve(String lwsopkrjve){
    this.lwsopkrjve = lwsopkrjve;
    }

    public String getLwsopkrjve(){
    return this.lwsopkrjve;
    }
    public void setBckxysofdz(String bckxysofdz){
    this.bckxysofdz = bckxysofdz;
    }

    public String getBckxysofdz(){
    return this.bckxysofdz;
    }
    public void setEluwatzmbv(String eluwatzmbv){
    this.eluwatzmbv = eluwatzmbv;
    }

    public String getEluwatzmbv(){
    return this.eluwatzmbv;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}